/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.institution.mapper;

import com.koron.institution.bean.Law;
import com.koron.institution.bean.LawCond;
import com.koron.institution.bean.LawItem;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface LawMapper {
    int deleteByPrimaryKey(String id);

    int insert(Law record);

    int insertSelective(Law record);

    Law selectByPrimaryKey(@Param("id") String id);

    int updateByPrimaryKeySelective(Law record);

    int updateByPrimaryKey(Law record);

    int countByCategoryId(String categoryId);

    int getTotalByCond(LawCond cond);

    Law getLawByFileName(Law law);

    List<Law> queryLawByCode(String code);

    List<Law> queryListByIds(List<String> list);

    List<Law> getSelectList(LawCond cond);

    int getSelectTotal(LawCond cond);

    List<Law> getLawListByCondition(@Param("fileName") String fileName, @Param("lawItem") String lawItem, @Param("categoryId") String categoryId, @Param("start") Integer start, @Param("pageSize") Integer pageSize);
    List<Law> getLawList(@Param("fileName") String fileName, @Param("lawItem") String lawItem);

    List<Law> getAllByCondition(@Param("idList") List<String>idList, @Param("start") Integer start, @Param("pageSize") Integer pageSize);

    Integer getTotalBycondition(@Param("fileName") String fileName, @Param("lawItem") String lawItem, @Param("categoryId") String categoryId);

    Integer cheak(@Param("fileName") String fileName, @Param("fileCode") String fileCode, @Param("categoryId") String categoryId, @Param("id") String id);

    Integer delete(@Param("id") String id);

    Integer batchInsert(@Param("lawList") List<Law> lawList);

    List<LawItem> getLawItems(@Param("lawIds") List<String> lawIds, @Param("lawItem") String lawItem);

    List<LawItem> getLawItem(@Param("lawId") String lawId, @Param("lawItem") String lawItem);

    List<LawItem> queryLawItemByLawId(@Param("lawId") String lawId);

    Integer deleteLawItemByLawId(@Param("lawId") String lawId);

    Integer batchInsertLawItem(@Param("lawItemList") List<LawItem> lawItemList);

    List<String> getIdsInLaw(@Param("lawItem")String lawItem);

    List<String> getIdsInLawItem(@Param("lawItem")String lawItem);

    List<String> getIdsInCategoryName(@Param("lawItem")String lawItem);
}